<template>
  <div class="Header">
    <p>Header---{{ msg }}</p>
  </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  name: "Header",
  computed: {
    //使用state 通过mapstate 映射 生成计算属性
    ...mapState("Movie", ["msg"]),
  },
};
</script>

<style>
.Header {
  width: 300px;
  height: 200px;
  background: blueviolet;
}
</style>
